<?php  if (!defined('BASEPATH')) exit('No direct script access allowed');

/*
| -------------------------------------------------------------------
| AuthenticatedControllerConfig.php
| -------------------------------------------------------------------
| Specify MIME types for each file extension.
|
|
*/

/*
| -------------------------------------------------------------------
| Default destinations
| -------------------------------------------------------------------
| Login
|   auth_form    : controller for login form (username & password)
|   auth_failed  : controller for login failed (ie wrong password)
|
| Logged In
|   auth_expired : controller for expired session
|   auth_denied  : controller for access denied
|   auth_logout  : controller to destroy session
|
|
*/
$config['auth_form']     = 'auth/form';
$config['auth_failed']   = 'auth/failed';
$config['auth_expired']  = 'auth/expired';
$config['auth_denied']   = 'auth/denied';
$config['auth_logout']   = 'auth/logout';

/*
| -------------------------------------------------------------------
| Landing pages
| -------------------------------------------------------------------
| Controllers to go to after successful login. Defined per group
|
|
*/
$config['landing'] = array(
	'admin' => 'auth/authwelcome',
	'user'  => 'auth/authwelcome'
	);	

/*
| -------------------------------------------------------------------
| Authenticators
| -------------------------------------------------------------------
| Specify which authenticator to use.
|
|
| $config['authenticator']    = "auth/SimpleAuthenticator";
| $config['authenticator']    = "auth/LDAPAuthenticator";
| $config['authenticator']    = "auth/MySQLAuthenticator";
|
*/

$config['authenticator']    = "auth/SimpleAuthenticator";
// $config['authenticator']    = "auth/LDAPAuthenticator";
// $config['authenticator']    = "auth/MySQLAuthenticator";


/*
| -------------------------------------------------------------------
| Authenticator Base Class Settings
| -------------------------------------------------------------------
| This is just a hardcoded dummy to define the Authenticator interface
|
|
*/

// $config['auth_username']     = 'user';
// $config['auth_password']     = 'dummy';

/*
| -------------------------------------------------------------------
| LDAPAuthenticator Settings
| -------------------------------------------------------------------
| Uncomment and defined if using LDAPAuthenticator
|
|
*/

// $config['ldap_host']    = 'ldap-host.example.com';
// $config['ldap_port']    = 389;
// $config['ldap_dn']      = 'uid=%s,ou=People,dc=example,dc=com';
// $config['ldap_filter']  = 'objectClass=person';
// $config['ldap_group']   = 'test';


/*
| -------------------------------------------------------------------
| MySQLAuthenticator Settings
| -------------------------------------------------------------------
| Uncomment and defined if using MySQLAuthenticator
|
|
*/

// $config['mysql_host']       = '127.0.0.1';
// $config['mysql_port']       = '';
// $config['mysql_user']       = 'mysql_user';
// $config['mysql_pass']       = 'mysql_password';
// $config['mysql_db'  ]       = 'mysql_database';
// $config['mysql_group'  ]    = 'test';

/*
| -------------------------------------------------------------------
| SimpleAuthenticator Settings
| -------------------------------------------------------------------
| Edit SimpleAuthenticator directly in SimpleAuthenticator.php
|
|
*/

/*
| -------------------------------------------------------------------
| SimpleAuthenticator Settings
| -------------------------------------------------------------------
| Edit SimpleAuthenticator directly in auth/SimpleAuthenticator.php
|
|
*/


/*
| -------------------------------------------------------------------
| Privilege Sets
| -------------------------------------------------------------------
| Define related privilege sets
|
|
| $set = array(
|         'test'      => '*',         // can be string with one metho
|         'success'   => array('*'),  // or can be array with one or many methods
|         'assets'    => '*',
|         '*'    => '*',
|     );
|
| Example:
|
| $admin = array(
|         '*'         => '*'
|     );
| 
| $write = array(
|         'books'         => 'new',
|         'books'         => 'change',
|         'books'         => 'delete'
|     );
| 
| $read = array(
|         'books'         => 'view'
|     );
| 
|
|
*/
    
$admin = array(
        '*'         => '*',
    );

$user = array(
        '*'         => '*',
    );

/*
| -------------------------------------------------------------------
| Groups
| -------------------------------------------------------------------
| Define groups as array of privilege sets.
| Users belonging to that group will have access
| as specified by the priv set.
|
| $config['groups'] = array(
|         'admin'    =>  array_merge($admin),
|         'user'     =>  array_merge($read, $write),
|         'readonly' =>  array_merge($read)
|     );
| 
|
|
*/

$config['groups'] = array(
        'admin'    =>  array_merge($admin),
        'user'     =>  array_merge($user),
    );

